<script lang="ts" setup>
  import Button from '@sscd/button';
  import Message from '@sscd/message';
  const success = () => {
    Message.loading('Action in progress..', 2.5)
      .then(
        () => Message.success('Loading finished', 2.5),
        () => {}
      )
      .then(() => Message.info('Loading finished is finished', 3.5));
  };
</script>

<template>
  <div class="demo">
    <div class="demo-title">Promise 接口</div>
    <div class="demo-content">
      <Button @click="success">Display a sequence of message</Button>
    </div>
  </div>
</template>
